Added fee market components. - #653
Conversation
| const low = feeEst && feeEst[12] | ||
| , high = feeEst && feeEst[3] | ||
| const low = feeEst && feeEst[feeEstimateTargets.low] | ||
| , high = feeEst && feeEst[feeEstimateTargets.average] |
There was a problem hiding this comment.
You take feeEstimateTargets.average but marked it as hight. This could lead to misunderstandings in feature.
const feeEstimateTargets: {
low: number;
average: number;
high: number;
}
| export const getBitcoinPrices = marketChart => | ||
| ((marketChart && marketChart.prices) || []) | ||
| .map(price => price && price[1]) | ||
| .filter(Number.isFinite) |
There was a problem hiding this comment.
Better to add check for array value, and we can simplify code like marketChart && marketChart.prices to marketChart?.prices
export const getBitcoinPrices = marketChart =>
(Array.isArray(marketChart?.prices) ? marketChart.prices : [])
.map(price => price && price[1])
.filter(Number.isFinite)
| value={formatFeeRate(feerate, unavailable)} | ||
| footer={formatUsd(feeUsd, unavailable)} |
There was a problem hiding this comment.
We can use default fallback instead of unavailable. The same in other places
| && Number.isFinite(feerate) && feerate >= 0 | ||
| ? (bitcoinPrice / satoshisPerBitcoin) * | ||
| feerate * | ||
| averageNativeSegwitTransactionVsize |
There was a problem hiding this comment.
We render this block for both networks.
On the Liquid Network, the concept of a "Native SegWit transaction" does not apply in the same way as on Bitcoin. Liquid uses a modified transaction architecture built on the Elements codebase, where default transfers are Confidential Transactions that bundle cryptographic range proofs and Pedersen commitments for privacy.
A standard single-input, dual-output Liquid transaction is significantly larger than a plain Bitcoin Native SegWit (P2WPKH) transaction - averaging roughly 1500 to 2000 bytes/vBytes instead of ~141 vBytes due to the mandatory inclusion of size-heavy range proofs (bulletproofs) that hide asset types and amounts.
To run locally, npm install and use the following snippets:
Bitcoin:

Liquid:
